unit cmdClearSelection;

interface

uses  classes, sysutils
    , nativeXml
    , appMappldXmlNode
    , appMappldXmlCommand
    , appMappldTypes
    , appMappldXmlContext
;

type
    {------------------------------ TCmdClearSelection }

    {***************************************************************************
    * TCmdClearSelection
    ***************************************************************************}
    TCmdClearSelection = class( TMappldXmlCommand )
protected
    procedure   internalProccess(); override;
    end;

implementation

{*******************************************************************************
* internalProccess
*******************************************************************************}
procedure TCmdClearSelection.internalProccess();
var
    i : integer;
begin
    for i := 0 to Fcontext.layersByCode.Count - 1 do
    begin
        Fcontext.layersByCode.items[i].selectedObjects.Clear( false );
    end;
end;

initialization

TMappldXmlCommand.registerCommandByCode( XML_CMD_ClearSelection, TCmdClearSelection );

end.
